<%= title t :instruments %>

<h1>Instruments</h1>

<%= link_to "New", :new_instrument %>

<% form_tag do -%>
  <p>
    Search:
		<%= text_field_tag :search_field %>

		<%= image_tag 'spinner.gif', :id => 'spinner', :style => 'display: none' %>
  </p>
<%end%>

<div id='results'>
    <%= render :partial => 'result', :collection => @instruments %>
</div>	

<br>

<%= link_to "Home", :controller => :home %>

<%= observe_field 'search_field',
        :url            => {:action => 'instruments_completion'},
        :frequency      => 1,
        :before         => "Element.show('spinner')",
        :complete       => [ visual_effect(:highlight, :results), "Element.hide('spinner')"],
        :update         => :results,
        :with           => 'prefix' %>

